package cn.geminis.resources.service.model;

import cn.geminis.lowcode.annotation.*;
import jakarta.persistence.Column;
import jakarta.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author Allen
 */
@Getter
@Setter
@UuidEntity
public class OrgUser implements Serializable {

    @Column(nullable = false, length = 32)
    private String type;

    @Column(nullable = false)
    private int showOrder;

    @ManyToOne(optional = false)
    @QueryFilterProperty(fieldName = "organization.id", propertyName = "organizationId", propertyType = "String")
    private Organization organization;

    @ManyToOne(optional = false)
    private User user;

}
